package com.kifas.model.xml;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class BarangModel implements Serializable {

	private static final long serialVersionUID = -6979972379910809851L;

	private Long idBarang;
	private String kdBarang;
	@XmlElement(name = "jenisBarangModel", type = JenisBarangModel.class)
	private JenisBarangModel jenisBarang;
	@XmlElement(name = "satuanModel", type = SatuanModel.class)
	private SatuanModel satuan;
	private String namaBarang;
	private BigDecimal hargaBeli;
	private BigDecimal hargaJual;
	private Long stokMinimal;
	private Long stokMaksimal;
	private String createdBy;

	public BarangModel() {
	}

	public BarangModel(Long idBarang, String kdBarang,
			JenisBarangModel jenisBarang, SatuanModel satuan,
			String namaBarang, BigDecimal hargaBeli, BigDecimal hargaJual, String createdBy) {
		this.idBarang = idBarang;
		this.kdBarang = kdBarang;
		this.jenisBarang = jenisBarang;
		this.satuan = satuan;
		this.namaBarang = namaBarang;
		this.hargaBeli = hargaBeli;
		this.hargaJual = hargaJual;
		this.createdBy = createdBy;
	}
	
	public BarangModel(Long idBarang, String kdBarang,
			JenisBarangModel jenisBarang, SatuanModel satuan,
			String namaBarang, BigDecimal hargaBeli, BigDecimal hargaJual, 
			Long stokMinimal, Long stokMaksimal, String createdBy) {
		this.idBarang = idBarang;
		this.kdBarang = kdBarang;
		this.jenisBarang = jenisBarang;
		this.satuan = satuan;
		this.namaBarang = namaBarang;
		this.hargaBeli = hargaBeli;
		this.hargaJual = hargaJual;
		this.stokMinimal = stokMinimal;
		this.stokMaksimal = stokMaksimal;
		this.createdBy = createdBy;
	}

	public Long getIdBarang() {
		return idBarang;
	}

	public void setIdBarang(Long idBarang) {
		this.idBarang = idBarang;
	}

	public String getKdBarang() {
		return kdBarang;
	}

	public void setKdBarang(String kdBarang) {
		this.kdBarang = kdBarang;
	}

	public JenisBarangModel getJenisBarang() {
		return jenisBarang;
	}

	public void setJenisBarang(JenisBarangModel jenisBarang) {
		this.jenisBarang = jenisBarang;
	}

	public String getNamaBarang() {
		return namaBarang;
	}

	public void setNamaBarang(String namaBarang) {
		this.namaBarang = namaBarang;
	}

	public SatuanModel getSatuan() {
		return satuan;
	}

	public void setSatuan(SatuanModel satuan) {
		this.satuan = satuan;
	}

	public BigDecimal getHargaBeli() {
		return hargaBeli;
	}

	public void setHargaBeli(BigDecimal hargaBeli) {
		this.hargaBeli = hargaBeli;
	}

	public BigDecimal getHargaJual() {
		return hargaJual;
	}

	public void setHargaJual(BigDecimal hargaJual) {
		this.hargaJual = hargaJual;
	}

	public Long getStokMinimal() {
		return stokMinimal;
	}

	public void setStokMinimal(Long stokMinimal) {
		this.stokMinimal = stokMinimal;
	}

	public Long getStokMaksimal() {
		return stokMaksimal;
	}

	public void setStokMaksimal(Long stokMaksimal) {
		this.stokMaksimal = stokMaksimal;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCreatedBy() {
		return createdBy;
	}

}
